package com.huirui.server.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户-商品收藏关联表
 *
 * @TableName t_user_product_favorite
 */
@TableName(value = "t_user_product_favorite")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ProductFavorite implements Serializable {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户ID（关联用户表主键）
     */
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 商品ID（关联商品表主键）
     */
    @TableField(value = "product_id")
    private Long productId;
    /**
     * 收藏时间
     */
    @TableField(value = "favorite_time")
    private LocalDateTime favoriteTime;
}